<template>
  <div>
      <h1>上课第一天</h1>
      <!-- <van-button>添加</van-button> -->
      {{form.name}}
      {{count}} <br>

      <!-- {{change}} -->
      <button @click="change">点击</button>
  </div>
</template>

<script>
import { reactive, ref } from '@vue/reactivity'
import { onMounted } from '@vue/runtime-core'
import axios from '../http/axios'


export default {
    name:'news',
    setup(){
        let form = reactive({'name':"asd","password":'123'})
        let count = ref(0)
        const change=()=>{
            form.name = 'abc',
            count.value = 12

            axios('/test','get').then(res=>{
                console.log(res);
            })

        }
        onMounted(()=>{
            change()
        })
        return{
            form,
            count,
            change
        }
    }
    
    
    
}
</script>

<style>

</style>